Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(relay/client): fail all log watchers in case of single stream failure #51

Merged

Conversation

daemon1024
Copy link
Member

@daemon1024 daemon1024 commented Apr 4, 2024

Switched to ErrorWaitGroups from simple waitgroups, so we can control behaviour of goroutine groups. Error Groups with Contexts, cancel context as soon as one of the sub goroutines return a non nil error. Added context handling inside Watch Functions so that context cancellation from error wait groups is handled.

This fixes the issue where one of the streams would error out, but the reconnection didn't happen because other streams are working as expected.

Copy link
Contributor

@rksharma95 rksharma95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@daemon1024 daemon1024 force-pushed the fix-partial-failure-client-reconnection branch from 806cefe to 84e6056 Compare April 15, 2024 14:44
…lure

Switched to ErrorWaitGroups from simple waitgroups, so we can control behaviour of goroutine groups.
Error Groups with Contexts, cancel context as soon as one of the sub goroutines return a non nil error.
Added context handling inside Watch Functions so that context cancellation from error wait groups is handled.

Signed-off-by: daemon1024 <[email protected]>
@daemon1024 daemon1024 force-pushed the fix-partial-failure-client-reconnection branch from 84e6056 to 199418b Compare April 15, 2024 15:02
@daemon1024 daemon1024 merged commit 3c866b7 into kubearmor:main Apr 16, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants